<ol class="breadcrumb">
    <li> <i class="fa fa-anchor"></i>
        &nbsp;系统管理
    </li>
    <li>修改密码</li>
</ol>

<div class="col-xs-12 info-center" >
    <div class="bs-callout bs-callout-warning">
        <h4>
            系统使用单位: <strong>{:C('COLLEGE_NAME')}</strong>
        </h4>
    </div>
</div>

<div class="col-xs-12 info-center">
<div class="panel panel-mcit">
    <div class="panel-heading">
        <h5 class="panel-title">修改密码</h5>
    </div>
    <div class="panel-body">
        <div class="alert alert-warning">
            <p><i class="fa fa-paperclip"></i>&nbsp;修改账号登录密码</p>
        </div>
        <form class="mcit-dataform" id="data_form" method="post" action={:U("Login/changePwd")}>
        <div class="panel-footer">    
            <div class="panel-mcit">

                <div class="col-xs-6">
                    <div class="input-group">
                        <span class="input-group-addon">手机</span>
                        <input type="text" id="phone" maxlength="11" name="phone" class="form-control" placeholder="手机号码">
                    </div>
                </div>
                <div class="clearfix" ></div>

                <div class="col-xs-6">
                    <div class="input-group">
                        <span class="input-group-addon">EMAIL</span>
                        <input type="text" id="email" name="email" class="form-control" placeholder="email">
                    </div>
                </div>
                <div class="clearfix" ></div>

                <div class="col-xs-6">
                    <div class="input-group">
                        <span class="input-group-addon">新密码</span>
                        <input type="password" id="password" name="password" class="form-control" placeholder="新密码">
                    </div>
                </div>
                <div class="clearfix" ></div>

                <div class="col-xs-6">
                    <div class="input-group">
                        <span class="input-group-addon">重复密码</span>
                        <input type="password" id="password1" name="password1" class="form-control" placeholder="重复密码">
                    </div>
                </div>
                <div class="clearfix" ></div>


                <div class="col-xs-6">
                    <button type="submit" class="btn btn-warning"><i class="fa fa-upload"></i>&nbsp;确定修改</button>
                </div>
                <div class="clearfix"></div>

            </div>
        </div>
        </form>
    </div>
</div>
</div>

<script>
    $("#data_form").ajaxForm({
        dataType:'json',
        clearForm:true,
        beforeSubmit:function(){
            if($("#phone").val()==''){
                alertify.error("请填写手机号");
                return false;
            }
            if($("#email").val()==''){
                alertify.error("请填写email");
                return false;
            }
            if($("#password").val()==''){
                alertify.error("请填写新密码");
                return false;
            }
            if($("#password1").val()==''){
                alertify.error("请再次输入新密码");
                return false;
            }
            return true
        },
        success:function(data){
            if(data.state==100){
                alertify.success(data.msg);
                location.href = data.url;
            }else{
                alertify.error(data.msg);
            }
        }
    });
</script>